//
// Created by 123 on 2025/1/7.
//
#include "iostream"
#include "string"
using namespace std;

void test(){
    string str1 = "abcdefghijk";
    int pos = str1.find("de");
    if (pos == -1){
        cout << "can not find" << endl;
    }else{
        cout << "pos=" << pos << endl;
    }
    pos = str1.rfind("de");
    cout << "pos=" << pos << endl;
}

void test2(){
    string str="abcdefg";
    str.replace(1,3,"1111");
    cout << "str=" << str <<endl;
}


int main115(){
    test();
    test2();

    return 0;
}